<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main2"/>
    <g:set var="entityName" value="${message(code: 'contract.label', default: 'OpportunityContract')}"/>
    <title>合同详情</title>
</head>
 <body>
<div class="main-body">
    <div class="page-wrapper">
        <!-- Page-header start -->
        <div class="page-header">
            <div class="page-header-title">
                <h4>合同详情</h4>
            </div>

            <div class="page-header-breadcrumb">
                <ul class="breadcrumb-title">
                    <li class="breadcrumb-item">
                        <a href="/salesDashboard/index">
                            <i class="icofont icofont-home"></i>
                        </a>
                    </li>
                    <li class="breadcrumb-item">
                        <g:link controller="contract" action="index">合同列表</g:link>
                    </li>
                    <li class="breadcrumb-item">合同详情</li>
                </ul>
            </div>
        </div>
        <!-- Page-header end -->
        <!-- Page-body start -->
        <div class="page-body">
            <g:if test="${flash.message}">
                <div class="message alert alert-info" role="status">${flash.message}
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">×</span></button>
                </div>
            </g:if>

        <!-- Hover table card start -->
        <div class="card">
                <div class="card-header">
                    <h5>合同详情</h5>

                    <div class="card-header-right">
                        <g:link action="edit" resource="${this.contract}" data-toggle="tooltip" data-placement="top" title="" data-original-title="编辑">
                            <i class="icofont icofont-edit"></i>
                        </g:link>
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>

                <div class="card-block">

                    <div class="form-group row">
                        <label class="col-md-2 control-label is-required">合同编号</label>
                        <div class="col-md-3">
                            <span class="cont">${this.contract?.serialNumber}</span>
                        </div>

                        <label class="col-md-2 control-label is-required">标题</label>
                        <div class="col-md-3">
                            <span class="cont">${this.contract?.subject}</span>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label IS-required">合同类型</label>

                        <div class="col-md-3">
                            <span class="cont">${this.contract?.type?.name}</span>

                        </div>
                        <label class="col-md-2 control-label is-required">状态</label>

                        <div class="col-md-3">
                            <span class="cont">${this.contract?.status?.name}</span>
                        </div>

                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">客户</label>

                        <div class="col-md-3">
                            <span class="cont">${this.contract?.account?.name}</span>
                        </div>

                        <label class="col-md-2 control-label">销售人员姓名</label>

                        <div class="col-md-3">
                            <span class="cont">${this.contract?.user?.fullName}</span>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>
                    <div class="form-group row">
                        <label class="col-md-2 control-label">创建人</label>

                        <div class="col-md-3 datePicker">
                            <span class="cont">${this.contract?.createBy}</span>
                        </div>
                        <label class="col-md-2 control-label">修改人</label>

                        <div class="col-md-3 datePicker">
                            <span class="cont">${this.contract?.createBy}</span>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">开始时间</label>

                        <div class="col-md-3 datePicker">
                            <span class="cont">
                                <g:formatDate date="${this.contract?.startTime}"
                                              format="yyyy-MM-dd"></g:formatDate>
                            </span>
                        </div>
                        <label class="col-md-2 control-label">结束时间</label>

                        <div class="col-md-3">
                            <span class="cont">
                                <g:formatDate date="${this.contract?.endTime}" format="yyyy-MM-dd"></g:formatDate>
                            </span>
                        </div>
                    </div>
                </div>

            </div>
            <!-- Hover table card end -->
            <div class="card">
                <div class="card-header">
                    <h5>定制字段</h5>

                    <div class="card-header-right">
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>
                <g:render template="/layouts/mashTemplate/flexFieldInstanceTemplate"/>
            </div>

            <div class="card">
                <div class="card-header">
                    <h5>地址</h5>

                    <div class="card-header-right">
                        <g:link controller="address" action="create" params="[contract: this.contract?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                            <i class="icofont icofont-plus"></i>
                        </g:link>
                        <i class="icofont icofont-rounded-down"></i>
                    </div>
                </div>
                <g:render template="/layouts/mashTemplate/addressTemplate"/>
            </div>

            <div class="card">
               <div class="card-header">
                   <h5>图片</h5>

                   <div class="card-header-right">
                       <g:link controller="note" action="create" params="[contract: this.contract?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                           <i class="icofont icofont-plus"></i>
                       </g:link>
                       <i class="icofont icofont-rounded-down"></i>
                   </div>
               </div>
               <g:render template="/layouts/mashTemplate/attachmentTemplate"/>
           </div>

           

 


          </div>
          <!-- Page-body end -->

        </div>
</div>
</body>
</html>
